using UnityEngine;
using UnityEngine.UI;
using System;
using System.Collections;

public class UIDynamicText : MonoBehaviour
{
	public string DynamicText 		= "";

	private Text m_TextComponent 	= null;

	void Awake()
	{
		m_TextComponent = GetComponent< Text >();
	}

	public void ChangeText( string _Value )
	{
		m_TextComponent.text = String.Format( DynamicText, _Value );
	}

	public void ChangeText( int _Value )
	{
		m_TextComponent.text = String.Format( DynamicText, _Value );
	}

	public void ChangeText( float _Value )
	{
		m_TextComponent.text = String.Format( DynamicText, _Value.ToString("0.00") );		
	}

	public void ChangeText( bool _Value )
	{
		m_TextComponent.text = String.Format( DynamicText, _Value );		
	}
}
